export default [
  {
    path: '/user',
    layout: false,
    routes: [{ name: '登录', path: '/user/login', component: './User/Login' }],
  },
  {
    path: '/user/register',
    layout: false,
    routes: [{name : '注册', path:'/user/register', component: './User/Register'}],
  },
  { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome'},
  { path: '/add_chart',name: '智能分析', icon: 'barChart', component: './AddChart'},
  { path: '/add_chart_async',name: '智能分析(异步)', icon: 'barChart', component: './AddChartAsync'},
  { path: '/webSocketComponent',name: '在线聊天室', icon: 'barChart', component: './WebSocketComponent'},
  { path: '/my_chart',name: '查看图表', icon: 'FundOutlined', component: './MyChart'},
  { path: '/user_manage',name: '用户管理', icon: 'FundOutlined', component: './UserManage'},
  { path: '/chart_manage',name: '图表管理', icon: 'FundOutlined', component: './ChartManage'},
  { path: '/user_info',name: '个人信息', icon: 'user', component: './User/UserInfo'},
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/sub-page' },
      { path: '/admin/sub-page', name: '二级管理页', component: './Admin' },
    ],
  },
  { path: '/', redirect: '/add_chart' },
  { path: '*', layout: false, component: './404' },
];
